import Erp from './index.vue';

//进货管理
// import Purchase from './purchase'; //进货单管理
// import PurchaseList from './purchaseList'; //进货单商品列表
import PurchasePresale from './purchasePresale.vue'; //集采单管理
import PurchasePresaleList from './purchasePresaleList.vue'; //集采单商品列表
import PurchaseRefund from './purchaseRefund'; //销货单管理
import PurchaseRefundList from './purchaseRefundList'; //销货单商品列表

//销货管理
// import salesList from './salesList.vue'; //销货单 SALES
import salesList1 from './salesList1.vue'; //调拔单 REQUISITION
import salesList2 from './salesList2.vue'; //回购单 REPURCHASE
import salesList3 from './salesList3.vue'; //销货退货单 SALES_RETURN
// import salesList4 from './salesList4.vue'; //集采单 INSINGLE

// import salesListGoods from './salesListGoods.vue'; //销货单
import salesListGoods1 from './salesListGoods1.vue'; //调拔单
import salesListGoods2 from './salesListGoods2.vue'; //回购单
import salesListGoods3 from './salesListGoods3.vue'; //销货退货单
// import salesListGoods4 from './salesListGoods4.vue'; //集采单

// import addPurchase from './addPurchase.vue';
import addPurchasePresale from './addPurchasePresale.vue'; 	//集采单
import addPurchaseRefund from './addPurchaseRefund.vue'; 	//销货单
// import addSalesList from './addSalesList.vue';
import addSalesList1 from './addSalesList1.vue'; 			//调拔单
import addSalesList2 from './addSalesList2.vue'; 			//回购单
import addSalesList3 from './addSalesList3.vue';			//销货退货单
// import addSalesList4 from './addSalesList4.vue';

// import updatePurchase from './updatePurchase.vue';
import updatePurchasePresale from './updatePurchasePresale.vue';
import updatePurchaseRefund from './updatePurchaseRefund.vue';
// import updateSalesList from './updateSalesList.vue';
import updateSalesList1 from './updateSalesList1.vue';
import updateSalesList2 from './updateSalesList2.vue';
import updateSalesList3 from './updateSalesList3.vue';
// import updateSalesList4 from './updateSalesList4.vue';

import {
	addApi
} from '@/utils/http';

export default {
	name: "erp",
	path: "erp",
	component: Erp,
	meta: {
		title: "进销存管理",
		menu: "进销存管理"
	},
	children: [
		// {
		// 	name: "purchase",
		// 	path: "purchase",
		// 	component: Purchase,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		// {
		// 	name: "PurchaseList",
		// 	path: "PurchaseList/:id",
		// 	component: PurchaseList,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
		  name: "purchasePresale",
		  path: "",
		  component: PurchasePresale,
		  alias: 'purchasePresale',
		  meta: {
		    title: "集采单管理"
		  }
		},
		{
			name: "PurchasePresaleList",
			path: "PurchasePresaleList/:id",
			component: PurchasePresaleList,
			meta: {
				title: "集采单商品列表"
			}
		},
		{
			name: "purchaseRefund",
			path: "purchaseRefund",
			component: PurchaseRefund,
			meta: {
				title: "销货单管理"
			}
		},
		{
			name: "purchaseRefundList",
			path: "purchaseRefundList/:id",
			component: PurchaseRefundList,
			meta: {
				title: "销货单商品列表"
			}
		},
		// {
		// 	name: "salesList",
		// 	path: "salesList",
		// 	component: salesList,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "salesList1",
			path: "salesList1",
			component: salesList1,
			meta: {
				title: "调拔单管理"
			}
		},
		{
			name: "salesList2",
			path: "salesList2",
			component: salesList2,
			meta: {
				title: "回购单管理"
			}
		},
		{
			name: "salesList3",
			path: "salesList3",
			component: salesList3,
			meta: {
				title: "销货退货单管理"
			}
		},
		// {
		//   name: "salesList4",
		//   path: "salesList4",
		//   component: salesList4
		// },
		// {
		// 	name: "salesListGoods",
		// 	path: "salesListGoods",
		// 	component: salesListGoods,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "salesListGoods1",
			path: "salesListGoods1/:id",
			component: salesListGoods1,
			meta: {
				title: "调拔单商品列表"
			}
		},
		{
			name: "salesListGoods2",
			path: "salesListGoods2/:id",
			component: salesListGoods2,
			meta: {
				title: "回购单商品列表"
			}
		},
		{
			name: "salesListGoods3",
			path: "salesListGoods3/:id",
			component: salesListGoods3,
			meta: {
				title: "销货退货单商品列表"
			}
		},
		// {
		//   name: "salesListGoods4",
		//   path: "salesListGoods4",
		//   component: salesListGoods4
		// },
		// {
		// 	name: "addPurchase",
		// 	path: "addPurchase",
		// 	component: addPurchase,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "addPurchasePresale",
			path: "addPurchasePresale",
			component: addPurchasePresale,
			meta: {
				title: "添加集采单"
			}
		},
		{
			name: "addPurchaseRefund",
			path: "addPurchaseRefund",
			component: addPurchaseRefund,
			meta: {
				title: "添加销货单"
			}
		},
		// {
		// 	name: "addSalesList",
		// 	path: "addSalesList",
		// 	component: addSalesList,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "addSalesList1",
			path: "addSalesList1",
			component: addSalesList1,
			meta: {
				title: "添加调拔单"
			}
		},
		{
			name: "addSalesList2",
			path: "addSalesList2",
			component: addSalesList2,
			meta: {
				title: "添加回购单"
			}
		},
		{
			name: "addSalesList3",
			path: "addSalesList3",
			component: addSalesList3,
			meta: {
				title: "添加销货退货单"
			}
		},
		// {
		//   name: "addSalesList4",
		//   path: "addSalesList4",
		//   component: addSalesList4
		// },
		// {
		// 	name: "updateSalesList",
		// 	path: "updateSalesList/:id",
		// 	component: updateSalesList,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "updateSalesList1",
			path: "updateSalesList1/:id",
			component: updateSalesList1,
			meta: {
				title: "修改调拔单"
			}
		},
		{
			name: "updateSalesList2",
			path: "updateSalesList2/:id",
			component: updateSalesList2,
			meta: {
				title: "修改回购单"
			}
		},
		{
			name: "updateSalesList3",
			path: "updateSalesList3/:id",
			component: updateSalesList3,
			meta: {
				title: "修改销货退货单"
			}
		},
		// {
		//   name: "updateSalesList4",
		//   path: "updateSalesList4/:id",
		//   component: updateSalesList4
		// },
		{
			name: "updatePurchasePresale",
			path: "updatePurchasePresale/:id",
			component: updatePurchasePresale,
			meta: {
				title: "修改集采单"
			}
		},
		// {
		// 	name: "updatePurchase",
		// 	path: "updatePurchase/:id",
		// 	component: updatePurchase,
		// 	meta: {
		// 		title: "修改banner"
		// 	}
		// },
		{
			name: "updatePurchaseRefund",
			path: "updatePurchaseRefund/:id",
			component: updatePurchaseRefund,
			meta: {
				title: "修改销货单"
			}
		},
	]
}

export const Api = {
	stockInAdd: "stockIn/add", //添加进货单
	stockInList: 'stockIn/query', //进货单列表
	stockInDetails: "stockIn/queryDetails", //进货单详情
	stockInUpdate: "stockIn/update", //保存进货单

	//出库存
	stockUseAdd: "stockUse/add", //添加
	stockUseList: 'stockUse/query', //列表
	stockUseDetails: "stockUse/queryDetails", //详情
	stockUseUpdate: "stockUse/update", //保存
}

addApi(Api);